Skip to main content

RawFileSystem

Members


Device(device, attributes) → a

The parameters for Device are as follows:

  • The device parameter can be anything.
  • The attributes parameter is a FileAttributes.

The only return is a FileSystemDevice.


Directory(contents, attributes, readonly) → a

The parameters for Directory are as follows:

  • The contents parameter is a dictionary with keys that are strings and values that are FileSystemFileNodes.
  • The attributes parameter is a FileAttributes.
  • The readonly parameter is a boolean. It can also be nil.

The only return is a FileSystemDirectory.


File(contents, attributes) → a

The parameters for File are as follows:

  • The contents parameter is a string.
  • The attributes parameter is a FileAttributes.

The only return is a FileSystemFile.


The parameters for Link are as follows:

  • The pathname parameter is a string.
  • The attributes parameter is a FileAttributes.

The only return is a FileSystemLink.


Root(root, attributes) → a

The parameters for Root are as follows:

The only return is a FileSystemRoot.


SYSTEM_NOACCESS

It is of the type FileAttributes.


SYSTEM_READONLY

It is of the type FileAttributes.


read(self, root, pathname, options) → (self, a)

The parameters for read are as follows:

The only return is a FileSystemFileNode. It can also be nil.


The parameters for readlink are as follows:

The only return is a FileSystemFileNode. It can also be nil.


write(self, root, pathname, node, options) → self

The parameters for write are as follows:

It has no return values.

Luau Type

This is the luau type for RawFileSystem. It may help clear up mistranslations from the raw data to the wiki page (as it is an automatic process).

export type RawFileSystem = {
SYSTEM_READONLY: FileAttributes,
Directory: (contents: {
[string]: FileSystemFileNode,
}, attributes: FileAttributes, readonly: boolean?) -> FileSystemDirectory,
write: (self: RawFileSystem, root: FileSystemRoot, pathname: string, node: FileSystemFileNode, options: FileSystemOperationOptions?) -> (),
Link: (pathname: string, attributes: FileAttributes) -> FileSystemLink,
Device: (device: any, attributes: FileAttributes) -> FileSystemDevice,
SYSTEM_NOACCESS: FileAttributes,
read: (self: RawFileSystem, root: FileSystemRoot, pathname: string, options: FileSystemOperationOptions?) -> FileSystemFileNode?,
readlink: (self: RawFileSystem, root: FileSystemRoot, link: FileSystemLink, options: FileSystemOperationOptions?) -> FileSystemFileNode?,
File: (contents: string, attributes: FileAttributes) -> FileSystemFile,
Root: (root: FileSystemDirectory, attributes: FileAttributes) -> FileSystemRoot,
}